
public class Proposal {

	public byte m_contractID;
	public byte m_contractType;
	public byte m_commandID;
	public byte m_xCoord;
	public byte m_yCoord;
	public byte m_var1;
	public char[] alphabet;
	public byte m_senderID;
	
	public Proposal (byte senderID, byte contractID, byte contractType, byte commandID,  byte var1, byte xCoord, byte yCoord)
	{
		m_contractID = contractID;
		m_contractType = contractType;
		m_senderID = senderID;
		
		alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789()".toCharArray();
		m_commandID = commandID;
		m_xCoord = xCoord;
		m_yCoord = yCoord;		
		m_var1 = var1;
	}
	
	
	public char[] GetSerializedProposal()
	{
		char[] serializedProposal = new char[10];

		serializedProposal[0] = alphabet[m_senderID];//Sender 
		serializedProposal[1] = alphabet[m_contractID];
		serializedProposal[2] = alphabet[m_contractType];
		
		
		serializedProposal[6] = alphabet[m_commandID];
		serializedProposal[7] = alphabet[m_var1];
		serializedProposal[8] = alphabet[m_xCoord];
		serializedProposal[9] = alphabet[m_yCoord];
				
		return serializedProposal;
		
	}
	
	
}
